﻿<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>任务页面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<link rel="stylesheet" type="text/css" th:href="@{/css/style.css}"/>
<link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>
<script type="text/javascript" th:src="@{/js/jquery-1.4.2.min.js}"></script>

<body>
	<div id="main">
      <div class="sort_switch">
          <ul id="TabsNav">
          	  <li class="" id="candidate"><a th:href="@{/process/listTask(taskType=candidate)}">待办的任务</a></li>
          	  <li class="" id="assignee"><a th:href="@{/process/listTask(taskType=assignee)}">受理的任务</a></li>
          </ul>
      </div>
      
      <div class="sort_content">
          <table class="tableHue1" width="100%" border="1" bordercolor="#a4d5e3" cellspacing="0" cellpadding="0">
              <thead>
                <tr>
                  <td width="40%"><strong>标题</strong></td>
                  <td width="15%"><strong>申请时间</strong></td>
                  <td width="10%"><strong>操作</strong></td>
                </tr>
              </thead>
              <tbody>
                <tr th:each="task : ${tasks}">
                  <td th:text="${task.title}"></td>
                  <td th:text="${task.requestDate}"></td>
                  <td>
                  	<a th:if="${taskType == 'assignee'}" th:href="@{/process/perform(taskId=${task.taskId})}">办理</a>
                  	<a th:if="${taskType == 'candidate'}" th:href="@{/process/claim(taskId=${task.taskId})}">领取</a>
                  	<a th:href="@{/process/diagram(taskId=${task.processInstanceId})}">查看</a>
                  </td>
                </tr>
              </tbody>
          </table>
      </div>

      
	</div>
    
</body>
<script>
	var taskType = "${taskType}";
	$("#" + taskType).attr("class", "selected");
</script>
</html>
